package com.runda.controller.delivery;

import javax.annotation.Resource;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.bbjob.dto.Result;
import com.runda.query.QueryRegisteInfo;
import com.runda.service.IRegisteService;

@Api(tags="registeApi-delivery", description="注册管理(分发中心用绕过登录)")
@RestController
@RequestMapping(path="delivery/registe", produces="application/json;charset=utf-8")
public class DeliveryRegisteController {
	
	@Resource
	private IRegisteService registeService;
	
	@ApiOperation(value="考试机注册", notes="考试机注册")
	@ApiImplicitParam(name="registeInfo", value="考试机信息", required=true, dataType="QueryRegisteInfo")
	@RequestMapping(value="save", method=RequestMethod.POST)
	public Result registe(@RequestBody QueryRegisteInfo registeInfo) {
		
		return registeService.registe(registeInfo);
	}
	
	@ApiOperation(value="考试机是否注册", notes="考试机是否已经注册")
	@ApiImplicitParam(name="registeInfo", value="考试机信息", required=true, dataType="QueryRegisteInfo")
	@RequestMapping(value="validate", method=RequestMethod.POST)
	public Result validate(@RequestBody QueryRegisteInfo registeInfo) {
		
		return registeService.validate(registeInfo);
	}
	
}
